import request from '@/utils/request'

// 查询订单详情列表
export function listTyOrder(query) {
  return request({
    url: '/pay/tyOrder/list',
    method: 'get',
    params: query
  })
}

// 查询订单详情详细
export function getTyOrder(id) {
  return request({
    url: '/pay/tyOrder/' + id,
    method: 'get'
  })
}

// 新增订单详情
export function addTyOrder(data) {
  return request({
    url: '/pay/tyOrder',
    method: 'post',
    data: data
  })
}

// 修改订单详情
export function updateTyOrder(data) {
  return request({
    url: '/pay/tyOrder',
    method: 'put',
    data: data
  })
}
// 订单退款
export function refundOrder(data) {
  return request({
    url: '/pay/tyOrder/refundOrder',
    method: 'post',
    data: data
  })
}

// 订单取消
export function cancelOrder(data) {
  return request({
    url: '/pay/tyOrder/cancelOrder',
    method: 'post',
    data: data
  })
}


export function delTyOrder(id) {
  return request({
    url: '/pay/tyOrder/' + id,
    method: 'delete'
  })
}
